package com.pxene.dmp.test2;

import com.pxene.dmp.useragent.Client;
import com.pxene.dmp.useragent.Parser;

public class UATest {
	public static void main(String[] args) throws Exception {
		Parser parser = new Parser();
		String ua = "Mozilla/5.0 (Linux; U; Android 3.0; en-us; Xoom Build/HRI39) AppleWebKit/534.13 (KHTML, like Gecko) Version/4.0 Safari/534.13";
		ua="AT8801 one s; 5.1; AT8801 one s 20160506-222531; zh-cn";
		ua="WenWenApp/1.3.1 (F8909; Android 4.4.4; zh_CN; A10000496792F4; ch:1031; cs:98c564fa)";
		System.out.println(parser.parseDevice(ua).family + "  " + parser.parseOS(ua).family);

		Parser uaParser = new Parser();
		Client c = uaParser.parse(ua);
		System.out.println(c.os.major);
		System.out.println(c.os.minor);
		
	}
}
